package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {
    // 根据菜品ID查询套餐ID
    List<Long> getSetmealIdsByDishIds(List<Long> dishIds);

    // 批量插入套餐菜品关系
    void insert(List<SetmealDish> setMealDishes);

    // 批量删除套餐菜品关系
    void deleteBySetmealId(List<Long> ids);

    @Select("select * from setmeal_dish where setmeal_id = #{id};")
    List<SetmealDish> getSetmealByDishId(Long id);
}
